package com.zmj.sy.mom.srv.aps.mapper;

import com.zmj.sy.mom.srv.aps.bean.entity.base.PhaseJobRef;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PhaseJobRefMapper extends SyMapper<PhaseJobRef> {

    @Select("UPDATE tb_base_phase_job_ref SET seq = seq - 1 WHERE seq > #{seq} AND phase_id = #{phaseId}")
    void updateOutSeq(@Param("seq") Integer seq, @Param("phaseId") Integer phaseId);

    @Select("DELETE FROM tb_base_phase_job_ref WHERE id = #{id}")
    void deleteOut(@Param("id") Integer id);

}
